package com.example.health_life.service;

import com.example.health_life.dao.New;

import java.util.List;

public interface NewService {
    List<New> getNewsList();

    List<New> getArticleListByType(Byte type);

    New getNewById(Integer id);

    List<New> getNewsListWithAuthor();

    List<New> getNewsListWithAuthor(Integer status);

    New getNewByIdWithAuthor(Integer id);

    List<New> getArticleListByTypeWithAuthor(Byte type);

    List<New> getArticleListByTypeWithAuthor(Byte type, Integer status);

    int addNew(New news);

    int deleteNew(Integer id);

    int updateNew(Integer id, String title, String content, Integer type, String coverImg,
                 Integer view, Integer favorite, Integer status);
}
